#Region "Imports"

Imports System
Imports System.Data
Imports System.Drawing
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

Imports MetaSapiens.PageMethods

#End Region

Partial Public Class FrmProduct
  Inherits MetaSapiens.PageMethods.BasePage

  <PageMethod(True)> _
  Public Sub GetFromProductID(<ParamRequired(), ParamName("ProdID")> ByVal productID As String)
    Response.Write("GetFromProductID(" & productID & ")")
  End Sub

  <PageMethod()> _
  Public Sub TestBoolean(ByVal b As Boolean)
    Response.Write("TestBoolean(" & b & ")")
  End Sub

  <PageMethod()> _
  Public Sub TestDateTime(ByVal d As DateTime)
    Response.Write("TestDateTime(" & d & ")")
  End Sub

  <PageMethod()> _
  Public Sub TestDecimal(ByVal d As Decimal)
    Response.Write("TestDecimal(" & d.ToString() & ")")
  End Sub

  <PageMethod()> _
  Public Sub TestEnum(ByVal color As KnownColor)
    Response.Write("TestEnum(" & color.ToString("g") & ")")
  End Sub

  <PageMethod()> _
  Public Sub TestEncoding(ByVal s As String)
    Response.Write("TestEncoding(" & s & ")")
  End Sub

  <PageMethod()> _
  Public Sub TestGuid(ByVal guid As Guid)
    Response.Write("TestGuid(" & guid.ToString("D") & ")")
  End Sub

  <PageMethod(), UrlFormat("~/SampleUrl/{{METHOD}}/{param}.aspx")> _
  Public Sub TestUrlFormat(ByVal param As Integer)
    ' URL rewriting is performed in Global.asax
    Response.Write("TestUrlFormat(" & param & ")")
  End Sub

  <PageMethod(), UrlFormat("~/SampleUrlWithPost/{param1}.aspx")> _
  Public Sub TestUrlFormatWithPost(ByVal param1 As Integer, ByVal param2 As Integer)
    ' URL rewriting is performed in Global.asax
    Response.Write("TestUrlFormat(" & param1 & ", " & param2 & ")")
  End Sub

End Class